<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    /*
    *unshift(被添加元素);   push(被添加元素);
    *unshift(被添加元素);在第一个元素前添加元素
    *push(被添加元素);在最后一个元素后添加元素
    */
    var currentDay="星期四";
    var dayList=[currentDay];
    dayList.unshift("星期一","星期二","星期三");
    dayList.push("星期五","星期六","星期日");
    console.log(dayList);

    var arr1 = ["hello","world"];
    var arr2 = ["hello","JavaScript"];
    var arr3 = ["arr3"];
    /*
    *arr.concat(arr1,arr2);
    *会将arr, arr1，arr2合并，得到一个
    *新数组，但是不会对arr产生影响
    */
    var arr4 = arr1.concat(arr2,arr3);
    console.log(arr4);
    console.log(arr1);
</script>
</html>